<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>js脚本语言</title>
		<script>
			document.write("<h3>JavaScript数据类型及typeof使用</h3>");
			var undef, width = 80,
				height = 20.5,
				fill = true;
			var fileName = "typeof.html";
			var objecttype = new Date();
			document.write("undef类型为：" + typeof(undef) + "<br>");
			document.write("width类型为：" + typeof(width) + "<br>");
			document.write("height类型为：" + typeof(height) + "<br>");
			document.write("fill类型为：" + typeof(fill) + "<br>");
			document.write("fileName类型为：" + typeof(fileName) + "<br>");
			document.write("objecttype类型为：" + typeof(objecttype) + "<br>");

			// js对象应用
			var text = new Object(); // 定义了一个对象
			text.width = 80; // 定义对象的属性名并为其进行赋值
			text.height = 20;// 定义对象的属性名并为其进行赋值
			text.name = "密码框";
			text.ssssssss = "又一个属性名"
			text.color = "blue";
			document.write(text.name + "的宽和高分别为：" + text.width + " " + text.height + "!"+text.ssssssss+"<br>");
			// 定义了一个字符串对象
			var tmp = "object.html";
			document.write("tmp字符串长度：" + tmp.length + "，tmp字符串大写结果：" + tmp.toUpperCase() + "!");
			// 调用系统函数
			var num = prompt("请输入需要打印出多少行小太阳：","10");
			document.write("<br/>你刚才从弹出输入了："+num)
		</script>
	</head>

	<body>
	</body>

</html>